<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=480,user-scalable=yes,uc-user-scalable=yes,target-densitydpi=high-dpi"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <script language="javascript" type="text/javascript" src="{$file}/jj.js"></script>
    <script language="javascript" type="text/javascript" src="{$file}/min.js"></script>
	<script type="text/javascript"  src="http://libs.baidu.com/jquery/2.0.0/jquery.js" charset="utf-8"></script>
    <title>{$item['title']}</title>
<style>
	body{margin:0px; background-color:#434243; color:#6A6A6A;}
	.bandiv{float:left; width:100%; background-color:#DBD1BB;}
		.bandiv div{padding:10px; text-align:left;}
</style>
</head>
<body onload="main()" lang="http://wx.weizhiyunduan.com/addons/wechat_games/" id="0">
<div style="text-align:center;">
	<canvas id="jsGameScreen"> 
	</canvas> 
</div>
	{if $follow != 1}
		{php include $this->template('follow') }
	{/if}
{php include $this->template('footer') }
		<script language=javascript>
		var file = "{php echo $file}";
		var id = "{php echo $id}";
		var token = "{php echo $token}";
	//	var mebtnopenurl = 'http://wx.weizhiyunduan.com';
		var mebtnopenurl = "{php echo $url}";
		window.shareData = {
		        "imgUrl": "./1.png",
		        "timeLineLink": "http://wx.weizhiyunduan.com/addons/wechat_games/games/mingxuanyixian/",
		        "tTitle": "命悬一线-微赢网络小游戏",
		        "tContent": "用绳命在玩的游戏"
		};
		
		
		function dp_submitScore(m,t){
	
			if(t>1000){
				alert("不错哦！得了"+t+"分！");
				dp_share(t);
			}
	   $.ajax({
        type:'POST',
        url:'../api.php?this=custom&token='+token+'&plugin=jy_h5game&action=welcome&op=bs&id='+id+'&bs='+t,
        data:"name=John&location=Boston",
        success:
        function(data){
         // alert(data);
         }
        });
		}
		
		function dp_share(t){
			document.title = t+"分！吓死我了，玩完这个《命悬一线》我得了恐高症！微赢网络小游戏";
			document.getElementById("share").style.display="";
			window.shareData.tTitle = document.title;
		}
		function dp_Ranking(){
			//alert("到更多");
			window.location=mebtnopenurl;
		}

		function showAd(){
		}
		function hideAd(){
		}
		document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
		    
		    WeixinJSBridge.on('menu:share:appmessage', function(argv) {
		        WeixinJSBridge.invoke('sendAppMessage', {
		            "img_url": window.shareData.imgUrl,
		            "link": window.shareData.timeLineLink,
		            "desc": window.shareData.tContent,
		            "title": window.shareData.tTitle
		        }, function(res) {
		        	document.location.href = mebtnopenurl;
		        })
		    });

		    WeixinJSBridge.on('menu:share:timeline', function(argv) {
		        WeixinJSBridge.invoke('shareTimeline', {
		            "img_url": window.shareData.imgUrl,
		            "img_width": "640",
		            "img_height": "640",
		            "link": window.shareData.timeLineLink,
		            "desc": window.shareData.tContent,
		            "title": window.shareData.tTitle
		        }, function(res) {
		        	document.location.href = mebtnopenurl;
		        });
		    });
		}, false);
		</script>


<div id='share' style="display:none">

</div>
</body>
</html>
